<style>
  .posts {
    list-style-image: url("/assets/img/meshery/meshery-logo-light.svg");
    line-height: 1rem;
  }
  .post {
    padding: 0.3rem 0.4rem;
  }
</style>

<h2>Recent Discussions with "{{ include.tag }}" Tag</h2>
<ul class="posts">
  {% if include.tag == "mesheryctl" %}
  <!-- -->
  {% assign item = site.data.discuss.mesheryctl -%}
  <!-- -->
  {% else %}
  <!-- -->
  {% assign item = site.data.discuss.meshery -%}
  <!-- -->
  {% endif %}
  <!-- -->
  {% assign users = item.users %}
  <!-- -->
  {% assign topics = item.topic_list.topics %}
  <!-- -->

  {% for post in topics limit:10 %}
  <!-- -->
  <li class="post">
    <span class="post-date"> {{ post.created_at | date: "%b %d" }} | </span>
    <a href="http://discuss.meshery.io/t/{{ post.topics[0].slug }}/{{ post.id }}"> {{ post.title }}</a>
    <span class="poost-author">
      {%for user in users%} {% if(post.posters[0].user_id == user.id)%} {%assign author = user.name%} {%break%}
      {%endif%} {%endfor%} by {{author}}
    </span>
  </li>
  {% endfor %}
</ul>

